package com.xuan.bkm.service.user.admin.dao;

import com.xuan.bkm.entity.Admin;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.Set;

@Repository
public interface IAdminDao extends JpaRepository<Admin,Integer> {
    Admin findByNumAndPassword(String num,String password);

    @Query(value = "select admin_num from admin_tab",nativeQuery = true)
    Set<String> findAllNums();
}
